<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<div id="div"></div>
<body>
<script>
const div = document.querySelector('#div');
Object.assign(div.style, {
  width: '100px',
  height: '200px',
  background: 'red',
})


</script>
</body>
</html>